package edu.sctu.practice.class01.zhoumengxue.assign.assign03.assign03_2;

/**
 * Created by ASUS on 2015/10/22.
 */
public class ComparableCircle extends Circle implements Comparable {

    public ComparableCircle(double radius) {
        super(radius);
    }

    @Override
    public int compareTo(Object o) {

        if (findArea() > ((ComparableCircle) o).findArea()) {
            return 0;
        } else {
            return 1;
        }
    }

    public double findArea() {

        return Math.PI * radius * radius;
    }


}
